<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit|ie-comp|ie-stand" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title></title>
<%@ include file="/mete.jsp"%>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/city_select.js"></script>
<script type="text/javascript">
$(function(){
	$("#city").attr("disabled","disabled");
	$("#county").attr("disabled","disabled");
	$("#province").change(function(){
		if(!$("#province").val()){		//如果省份下拉列表的值为空,则设置区县和城市的下拉列表不可用,值为空
			$("#city option:first").prop("selected", 'selected');
			$("#city").attr("disabled","disabled");
			$("#county option:first").prop("selected", 'selected');
			$("#county").attr("disabled","disabled");
			return;
		}
		$("#city").attr("disabled",false);
		$.get("${pageContext.request.contextPath }/gasstation!getCities.do",{"provinceCode":$("#province").val()},function(resq){
			var json = eval('(' + resq + ')'); 
			$("#city").html(json.data);
		});
		$("#county").html("");
	})
	$("#city").change(function(){
		console.log($("#city").val());
		if(!$("#city").val()){		//如果城市下拉列表的值为空,则设置区县的下拉列表不可用,值为空
			console.log("...")
			$("#county option:first").prop("selected", 'selected');
			$("#county").attr("disabled","disabled");
			return;
		}
		$("#county").attr("disabled",false);
		$.get("${pageContext.request.contextPath }/gasstation!getCounties.do",{"cityCode":$("#city").val()},function(resq){
			console.log(resq);
			var json = eval('(' + resq + ')'); 
			$("#county").html(json.data);
		})
	})
})
	
</script>
</head>
<body>
	<div class="meijieContent">
		<div class="myform app_info">
		<form action="/App/EditInfo" class="form-horizontal n-validator n-yellow" id="frmApp" method="post" role="form">
			<h2>新增网点</h2>
			<ul>
            <table>
            
               <tr class="trbg">
                    <td class="colname"><span class="warn">*</span>名称:</td>
                    <td class="content">0000</td>
               </tr>
               <tr class="trbg">
                    <td class="colname"><span class="warn">*</span>联系人:</td>
                    <td class="content">0000</td>
               </tr>
               <tr class="trbg">
                    <td class="colname"><span class="warn">*</span>联系方式:</td>
                    <td class="content">0000</td>
               </tr>
               <tr class="trbg">
                    <td class="colname"><span class="warn">*</span>省份:</td>
                    <td class="content">
                    	0000
					</td>
               </tr>
               <tr class="trbg">
                    <td class="colname"><span class="warn">*</span>城市:</td>
                    <td class="content">
                   		0000
					</td>
               </tr>
               <tr class="trbg">
                    <td class="colname"><span class="warn">*</span>区县:</td>
                    <td class="content">
                   		0000
					</td>
               </tr>
               <tr class="trbg">
                    <td class="colname"><span class="warn">*</span>地址:</td>
                    <td class="content" style="padding: 5px">0000</td>
               </tr>
            </table>
		</ul>
	</form>
	</div>
	</div>
</body>

</html>
